package com.ruoyi.repayment.utils;

/**
 * 定义接口的返回
 * 统一数据格式
 */
public class ResultInfo {
    private Boolean flag ; //是否成功

    private Integer code ;

    private String message ;

    private Object data ;

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public ResultInfo() {
    }

    /**
     * 增 删  改   使用
     * @param flag
     * @param code
     * @param message
     */
    public ResultInfo(Boolean flag, Integer code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    /**
     * 查询使用
     * @param flag
     * @param code
     * @param message
     * @param data
     */
    public ResultInfo(Boolean flag, Integer code, String message, Object data) {
        this.flag = flag;
        this.code = code;
        this.message = message;
        this.data = data;
    }
}
